package com.gary.spring.proxy;

import java.lang.reflect.Method;
import java.security.Signature;

/**
 * @author peng_rui
 * @date 2022/7/3
 */
public class TestMethodInvoke {

    public static void main(String[] args) throws Exception {
        for (int i = 0; i < 20; i++) {
            Method foo = TestMethodInvoke.class.getMethod("foo", int.class);
            show(i, foo);
            foo.invoke(null, i);
        }
        System.in.read();
    }

    private static void show(int i, Method foo) {
        System.out.println(i + " : " + foo.getClass());
    }

    public static void foo(int i) {
        System.out.println(i + " : foo");
    }
}
